import 'package:flutter/material.dart';
import 'package:ball_lion/module/overlay/live_float_widget.dart';
import 'package:ball_lion/module/overlay/match_tip_float_widget.dart';
import 'package:ball_lion/module/overlay/ads_float_widget.dart';
import 'package:ball_lion/module/home/news_float2_widget.dart';

class AppFloatWidget extends StatefulWidget {
  const AppFloatWidget({super.key, required this.child});

  final Widget? child;

  @override
  State<AppFloatWidget> createState() => _AppFloatWidgetState();
}

class _AppFloatWidgetState extends State<AppFloatWidget> {
  @override
  Widget build(BuildContext context) {
    return Material(
        child: MediaQuery(
            data: MediaQuery.of(context)
                .copyWith(textScaler: TextScaler.linear(1.0)),
            child: Stack(
              children: [
                Container(child: widget.child),
                const AdsFloatWidget(),
                const NewsFloat2Widget(),
                const Positioned.fill(child: LiveFloatWidget()),
                const MatchTipFloatWidget(),
              ],
            )));
  }
}
